package com.wbs.resutil;

/**
 * @Author: 芝梦
 * @Description: 返回值通用常量
 *               枚举类内部private不会被反射查询到
 *               1 - 10 常规操作
 *               10 - 20 用于登陆或注册
 * @DateTime: 2024/1/25 11:26
 */
public enum ResultEnums {
    USERNAME_AND_PASSWORD_NOT_NULL("1","用户名或密码不能为空"),
    USERNAME_AND_PASSWORD_ERROR("2","用户名或密码不正确"),
    LOGIN_SUCCESS("3","登陆成功"),
    Operation_Success("4","操作成功"),
    Operation_Fail("5","操作失败"),
    TOKEN_FAI("6","TOKEN无效"),
    THE_USERNAME_ALREADY_EXISTS("7","用户名已存在"),
    THE_ID_DOES_NOT_EXIST("8","ID不存在"),
    SEND_SUCCESS("9","发送成功"),
    NEED_GENERATE_CAPTCHA("10","需要先生成验证码"),
    CAPTCHA_ERROR("11","验证码错误"),

    ADD_CART_SUCCESS("12","加入购物车成功"),

    HOT_SUCCESS("13","缓存预热成功");
    private String code;
    private String msg;

    ResultEnums(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
